home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / Linux / Cygwin / full.exe / Disk1 / data1.cab / Tools / share / tix4.1 / WInfo.tcl < prev   
Encoding:
Text File  |  1998-12-04  |  792 b   |  36 lines

  1. # WInfo.tcl --
  2. #
  3. #    This file implements the command tixWInfo, which return various
  4. #    information about a Tix widget.
  5. #
  6. # Copyright (c) 1996, Expert Interface Technologies
  7. #
  8. # See the file "license.terms" for information on usage and redistribution
  9. # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  10. #
  11.  
  12. proc tixWInfo {option w} {
  13.     upvar #0 $w data
  14.  
  15.     case $option {
  16.     tix {
  17.         # Is this a Tix widget?
  18.         #
  19.         return [info exists data(className)]
  20.     }
  21.     compound {
  22.         # Is this a compound widget?
  23.         #    Currently this is the same as "tixWinfo tix" because only
  24.         # Tix compilant compound widgets are supported
  25.         return [info exists data(className)]
  26.     }
  27.     class {
  28.         if {[info exists data(className)]} {
  29.         return $data(className)
  30.         } else {
  31.         return ""
  32.         }
  33.     }
  34.     }
  35. }
  36.